package com.wondersgroup.fjzlpt.plat.controller.view;

import com.alibaba.fastjson.JSONObject;
import com.quick.framework.boot.web.wapper.QuickPrincipal;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by lion on 2017/6/15.
 */
@Controller
public class IndexController {

    @RequestMapping("/index.html")
    public String index(HttpServletRequest request){
        QuickPrincipal qp = (QuickPrincipal)request.getUserPrincipal();
        JSONObject roleInfo = qp.getRoleInfo();
        JSONObject userInfo = qp.getUserInfo();
        request.setAttribute("userInfo", userInfo);
        request.setAttribute("roleInfo", roleInfo);
        return "index/index";
    }
}
